<!DOCTYPE html>
<html class="x-admin-sm">

<head>
	<meta charset="UTF-8">
	<title>电子学会比赛管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
	<link rel="stylesheet" href="./css/font.css">
	<link rel="stylesheet" href="./css/common.css">
	<link rel="stylesheet" href="./css/xadmin.css">
	<script src="./lib/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="./js/xadmin.js"></script>
</head>

<body>
<div>
	<div class="x-nav">
		<span class="layui-breadcrumb">
				<a href="">首页</a>
				<a><cite>比赛管理</cite></a>
				<a><cite>报名管理</cite></a>
		</span>
		<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
			<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
		</a>
	</div>
	<div class="layui-fluid">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-body">
						<form class="layui-form layui-col-space5 flex" style="display: flex;">
							<!--<div class="layui-input-inline layui-show-xs-block">-->
							<!--<input class="layui-input" placeholder="开始日" name="start" id="start"></div>-->
							<!--<div class="layui-input-inline layui-show-xs-block">-->
							<!--<input class="layui-input" placeholder="截止日" name="end" id="end"></div>-->
							<div class="layui-input-inline layui-show-xs-block flex">
								<div class="mr5">赛项</div>
								<select name="project">
									<option>全部</option>
									<option>支付宝</option>
									<option>微信</option>
									<option>货到付款</option>
								</select>
							</div>
							<div class="layui-input-inline layui-show-xs-block flex">
								<div class="mr5">赛区</div>
								<select name="division">
									<option value="">全部</option>
									<option value="0">待确认</option>
									<option value="1">已确认</option>
								</select>
							</div>
							<div class="layui-input-inline layui-show-xs-block flex">
								<div class="mr5">组别</div>
								<select name="group">
									<option value="">全部</option>
									<option value="0">小学</option>
									<option value="1">初中</option>
									<option value="2">高中</option>
								</select>
							</div>
							<div class="layui-input-inline layui-show-xs-block flex">
								<div class="mr5">审核状态</div>
								<select name="status">
									<option value="">全部</option>
									<option value="0">待审核</option>
									<option value="1">通过</option>
									<option value="2">不通过</option>
								</select>
							</div>
							<div class="layui-input-inline layui-show-xs-block flex">
								<div class="mr5" style="width: 40px;">账号</div>
								<input type="text" name="number" placeholder="账号" autocomplete="off" class="layui-input"></div>
							<div class="layui-input-inline layui-show-xs-block">
								<button class="layui-btn" lay-submit="" lay-filter="sreach">
									<i class="layui-icon">&#xe615;</i></button>
							</div>
						</form>
					</div>
					<div class="layui-card-header">
						<!--<button class="layui-btn layui-btn-danger" onclick="delAll()">-->
						<!--<i class="layui-icon"></i>批量删除-->
						<!--</button>-->
						<!--<button class="layui-btn" onclick="xadmin.open('添加用户','order-add.html',800,600)">-->
						<!--<i class="layui-icon"></i>添加-->
						<!--</button>-->
					</div>
					<div class="layui-card-body ">
						<!--<table class="layui-table layui-form" id="table">-->
						<!--</table>-->
						<div style="overflow-x: auto;" class="layui-form" id="content" v-cloak>
							<table class="layui-table">
							<span>共计***条数据</span>
							<!--<colgroup>-->
								<!--<col width="150">-->
								<!--<col width="200">-->
								<!--<col>-->
							<!--</colgroup>-->
							<thead>
							<tr>
								<th v-for="item in cols">{{ item.title }}</th>
							</tr>
							</thead>
							<tbody>
							<tr v-for="item in list">
								<td>{{ item.id }}</td>
								<td>{{ item.username }}</td>
								<td>{{ item.account }}</td>
								<td>{{ item.project }}</td>
								<td>{{ item.division }}</td>
								<td>{{ item.group }}</td>
								<td>{{ item.teamName }}</td>
								<td>{{ item.teacher }}</td>
								<td>{{ item.school }}</td>
								<td>{{ item.player }}</td>
								<td><a href="javascript:;" style="color: #01AAED;" onclick="parent.xadmin.open('队员信息','playerInformation.html',600,600)" class="layui-table-link">查看</a></td>
								<td>
									<a v-if="item.status  ===  1" href="javascript:;" style="color: #01AAED;" class="layui-table-link">{{status[item.status]}}</a>
									<span v-else>{{status[item.status]}}</span>
								</td>
								<td><a href="javascript:;"> {{ item.isEnter === 1  ? '弃权' : '参赛' }}</a></td>
								<td>
									<a v-if="item.status === 1" href="javascript:;" onclick="xadmin.open('审核','review.html',600,400)" style="color: #01AAED;" class="layui-table-link">审核</a>
									<a v-else href="javascript:;" style="color: #01AAED;" class="layui-table-link">{{participate[item.isEnter]}}</a>
								</td>
								<td>{{ item.note }}</td>
							</tr>
							</tbody>
						</table>
						</div>
						<section id="test1"></section>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


</body>
<script src="./js/vue.js"></script>
<script>
	var app=new Vue({
		el: '#content',
		data: {
			list:[],
			aaa: 123,
			status:['审核','待审核' ,'通过', '不通过'],
			participate:['审核','参赛' ,'弃权' ],
			cols: [ //表头
				{field: 'id', title: '序号', width: 80},
				{field: 'id', title: '团队ID', width: 80},
				{field: 'username', title: '账号', width: 110},
				{field: 'account', title: '用户名', width: 110},
				{field: 'project', title: '赛项', width: 110},
				{field: 'division', title: '赛区', width: 110},
				{field: 'group', title: '组别', width: 110},
				{field: 'teamName', title: '团队名称', width: 110},
				{field: 'teacher', title: '指导老师', width: 110},
				{field: 'school', title: '学校/机构', width: 135},
				{field: 'player', title: '队员', width: 135, templet: '#player'},
				{field: 'status', title: '审核状态', width: 135, templet: '#status'},
				{field: 'isEnter', title: '是否参赛', width: 135, templet: '#isEnter'},
				{field: 'operating', title: '操作', width: 135, templet: '#operating'},
				{field: 'note', title: '备注'}
			]
		},
		methods:{
			opentab:function(name,url){
				//单击事件
				console.log(name)
				console.log(url)
				xadmin.add_tab(name,url)
			},
			getData(){
				this.list =  [
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 1,
						isEnter: 1,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 3,
						isEnter: 1,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					},
					{
						id: 1,
						username: '张三',
						account: '1111',
						project: '11233',
						division: '张三',
						group: '1111',
						teamName: '11233',
						teacher: '张三',
						school: '1111',
						player: '11233',
						status: 2,
						isEnter: 2,
						operating: '123',
						note: '12'
					}
				]
				this.init()
			},
			init:function() {
				var that = this
				layui.use(['laypage'], function () {
					var laypage = layui.laypage;
					//执行一个laypage实例
					laypage.render({
						elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
						,count: 16 //数据总数，从服务端得到
					});
				})
			}
		}
	})
	window.onload=function(){
		app.getData()
	}
</script>
<script src="./js/jquery.min.js"></script>
<script>
$(function () {
	layui.use(['form'], function () {
		var form = layui.form
		// layer.msg('玩命卖萌中', function(){
		//   //关闭后的操作
		//   });
		//监听提交
		form.on('submit(sreach)', function (data) {
			console.log(data)
			// layer.msg(JSON.stringify(data.field), function () {
			// location.href = 'index.html'
			// })
			return false
		})
	})
})
</script>
</html>
